package com.xmall.controller.wx;

import com.xmall.bean.table.Region;
import com.xmall.bean.vo.BaseRespVo;
import com.xmall.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 谭涛
 */
@RestController("wxRegionController")
@RequestMapping("wx/region")
public class RegionController {

    @Autowired
    RegionService regionService;

    @RequestMapping("list")
    public BaseRespVo list(Integer pid){
        List<Region> result = regionService.queryList(pid);
        return BaseRespVo.ok(result);
    }
}
